﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using LiveTiss.Schemas;

namespace LiveTiss.Guias.UserControls
{
    public partial class DiagnosticoGuia : UserControl
    {
        #region Value

        public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value",
            typeof(ct_diagnosticoGuia), typeof(DiagnosticoGuia), new PropertyMetadata(null));

        public ct_diagnosticoGuia Value
        {
            get { return (ct_diagnosticoGuia)GetValue(ValueProperty); }
            set { SetValue(ValueProperty, value); }
        }

        #endregion

        public DiagnosticoGuia()
        {
            this.DataContext = this;

            if (this.Value == null)
            {
                this.Value = new ct_diagnosticoGuia()
                {
                    CID = new ct_diagnostico()
                    {
                        codigoDiagnostico = string.Empty,
                        descricaoDiagnostico = string.Empty,
                        nomeTabela = st_tabelasDiagnostico.CID10
                    },
                    indicadorAcidente = st_indicadorAcidente.Item0,
                    indicadorAcidenteSpecified = false,
                    tempoReferidoEvolucaoDoenca = new ct_tempoEvolucaoDoenca()
                    {
                        unidadeTempo = st_unidadeTempo.A,
                        valor = string.Empty
                    },
                    tipoDoenca = st_tipoDoenca.A,
                    tipoDoencaSpecified = false
                };
            }
            InitializeComponent();
        }
    }
}
